﻿/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 *
 * The Original Code is tyzoh.jp code.
 *
 * The Initial Developer of the Original Code is Kazutaka Kurihara.
 * Portions created by the Initial Developer are Copyright (C) 2007
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * ***** END LICENSE BLOCK ***** */
//using System;
//using System.Drawing;
//using System.Collections;
//using NUnit.Framework;
//namespace Qurihara.QBasic
//{
//	[TestFixture]
//	public class GridTest
//	{
//		Rectangle r,r2;
//		Point p;
//		Grid2DArrayList grid;
//		[SetUp]
//		public void Init()
//		{
//			r = new Rectangle(20,20,600,300);
//			r2 = new Rectangle(20+150,20+75,300,150);
//			p = new Point(320,170);
//			grid = new Grid2DArrayList(2,2);
//		}
//		[Test]
//		public void relativePointTest()
//		{
//			PointF pf = DrawingUtil.GetRelativePoint(r,p);
//			Assertion.AssertEquals(0.5f,pf.X);
//			Assertion.AssertEquals(0.5f,pf.Y);
//		}
//		[Test]
//		public void relativeRectTest()
//		{
//			RectangleF pf = DrawingUtil.GetRelativeRectangle(r,r2);
//			Assertion.AssertEquals(0.25f,pf.X);
//			Assertion.AssertEquals(0.25f,pf.Y);
//			Assertion.AssertEquals(0.5f,pf.Width);
//			Assertion.AssertEquals(0.5f,pf.Height);
//		}
//		[Test]
//		public void gridTest1()
//		{
//			grid.Add(DrawingUtil.GetRelativeRectangle(r,r2),r2);
//			Assertion.AssertEquals(2,grid.XResolution);
//			Assertion.AssertEquals(2,grid.YResolution);
//
//			PointF pf = DrawingUtil.GetRelativePoint(r,r2.Location);
//			QArrayList list = new QArrayList();
//			grid.GetPointedGridList(pf.X,pf.Y,ref list);
//			Assertion.AssertEquals(1,list.Count);
//		}
//	}
//
//}